package com.gxa.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.gxa.common.base.RespResult;
import com.gxa.domain.dto.PlanListDto;
import com.gxa.domain.entity.PlanList;
import com.gxa.mapper.PlanListMapper;
import com.gxa.service.PlanListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Throwable.class)
public class PlanListServiceImpl extends ServiceImpl<PlanListMapper, PlanList> implements PlanListService {
    @Autowired
    private PlanListMapper planListMapper;

    @Override
    public RespResult pagequery(PlanListDto planListDto) {
        PageHelper.startPage(planListDto.getPage(), planListDto.getPageSize());
        List<PlanList> planLists = planListMapper.pagequery(planListDto);
        return RespResult.success(planLists);
    }
}
